using System.Collections.Generic;
using System.Threading.Tasks;
using CR.Application.DTOs;
using CR.Domain.Entities;
using CR.ErrorCode;
using Microsoft.AspNetCore.Http;

namespace CR.Application.Interfaces
{
    /// <summary>
    /// 产品检验报告服务接口
    /// </summary>
    public interface IProductInspectionReportService
    {
        /// <summary>
        /// 获取指定溯源码的所有检验报告
        /// </summary>
        /// <param name="traceabilityCode">溯源码</param>
        /// <returns>检验报告列表和操作结果</returns>
        Task<ApiResult<IEnumerable<ProductInspectionReportDTO>>> GetByTraceabilityCodeAsync(string traceabilityCode);
        
        /// <summary>
        /// 添加产品检验报告
        /// </summary>
        /// <param name="traceabilityCode">溯源码</param>
        /// <param name="file">报告图片文件</param>
        /// <param name="webRootPath">Web根目录路径</param>
        /// <returns>添加的报告和操作结果</returns>
        Task<ApiResult<ProductInspectionReportDTO>> AddReportAsync(string traceabilityCode, IFormFile file, string webRootPath);
        
        /// <summary>
        /// 删除产品检验报告
        /// </summary>
        /// <param name="id">报告ID</param>
        /// <returns>操作结果</returns>
        Task<ApiResult> DeleteReportAsync(int id);
        
        /// <summary>
        /// 获取指定ID的检验报告
        /// </summary>
        /// <param name="id">报告ID</param>
        /// <returns>检验报告和操作结果</returns>
        Task<ApiResult<ProductInspectionReportDTO>> GetByIdAsync(int id);
    }
} 